﻿namespace Equinoxe.EZNFC.Library
{
    /// <summary>
    /// Character Set enum
    /// </summary>
    /// <remarks></remarks>
    public enum DeviceCharset
    {
        Ansi,
        Unicode
    }

    /// <summary>
    /// Communication ports enum
    /// </summary>
    /// <remarks></remarks>
    public enum Ports
    {
        COM1,
        COM2,
        COM3,
        COM4,
        COM5,
        COM6,
        COM7,
        COM8,
        COM9
    }

    /// <summary>
    /// Error codes enum
    /// </summary>
    /// <remarks></remarks>
    public enum ErrorCodes
    {
        // General device errors
        NoError = 0,
        NoTag = 31,
        NoMoreHandles = 0x20000001,
        UnknownStatus = 0x20000002,
        OperationFailure = 0x20000003,
        OperationTimeout = 0x20000004,
        InvalidChecksum = 0x20000005,
        InvalidParameter = 0x20000006,
        // NFC Tag errors
        TimeOut = 0x01,
        CRCError = 0x02,
        ParityError = 0x03,
        ErroneousBitCount = 0x04,
        FramingError = 0x05,
        AbnormalBitCollision = 0x06,
        CommunicationBufferSizeInsufficient = 0x07,
        RFBufferOverflow = 0x08,
        RFFieldNotSwitchedON = 0x0a,
        RFProtocolError = 0x0b,
        TemperatureError = 0x0d,
        InternalBufferOverflow = 0x0e,
        InvalidParameter2 = 0x10,
        DEPProtocolError = 0x12,
        DEPProtocolDataMismatch = 0x13,
        AuthenticationError = 0x14,
        WrongUIDCheckByte = 0x23,
        DEPProtocolInvalidDeviceState = 0x25,
        OperationNotAllowedInThisConfiguration = 0x26,
        UnacceptableCommand = 0x27,
        TargetChipReleased = 0x29,
        IDCardNotMatch = 0x2a,
        PreviousCardDisapeared = 0x2b,
        NFCID3Mismatch = 0x2c,
        OverCurrent = 0x2d,
        NADMissing = 0x2e,
        // own
        KeySizeError = 0x111,
        WrongImageFormat = 0x112
    }

    /// <summary>
    /// Tag type enum
    /// </summary>
    /// <remarks></remarks>
    public enum TagType
    {
        Empty,
        Mifare1K,
        Mifare4K,
        MifareUltralight,
        MifareMini,
        MifareDesfire,
        JCOP30,
        GemplusMPCOS,
        Unknown
    }

    /// <summary>
    /// Autentication keys enum
    /// </summary>
    /// <remarks></remarks>
    // TODO: check if needed, and/or change name
    public enum AuthenticatingKey
    {
        KeyA,
        KeyB
    }

    public enum LCDSCrollSpeed
    {
        Slow = 0xc0,
        Medium = 0xdd,
        Fast= 0xff
    }

    public enum LCDScrollDirection
    {
        LeftToRight,
        RightToLeft,
        TopToBottom,
        BottomToTop
    }
}
